Mock.mock("/js/xiangqing","post",function(){
    //获取本地存储
    let xqStr=localStorage.xq;
    return xqStr;
})

Mock.mock("/js/addshop","post",function(){
    let shopcar=localStorage.shopCar;
    let xqStr=localStorage.xq;
    let xqObj=JSON.parse(xqStr);
    if(shopcar==""||shopcar==null||shopcar==undefined||shopcar==[]){
        localStorage.shopCar=JSON.stringify([xqObj]);
        return true;
    }else{
        let shopcararr=JSON.parse(shopcar);
        shopcararr.push(xqObj);
        localStorage.shopCar=JSON.stringify(shopcararr);
        return true;
    }
})